package Multimedia;

import javax.swing.ImageIcon;
import javazoom.jlgui.basicplayer.BasicPlayer;
import javazoom.jlgui.basicplayer.BasicPlayerException;

public abstract class MultimediaZombie extends Multimedia{
	//ATRIBUTOS DE INSTANCIA
	protected ImageIcon imagen2;
	protected ImageIcon imagen3;
	
	//CONSTRUCTOR
	public MultimediaZombie(){
		sonido=new BasicPlayer();
		try {
			sonido.open(getClass().getClassLoader().getResource("Sonidos/zombieHerido.wav"));
		} catch (BasicPlayerException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();}
	}
	
	//COMANDOS
	public void reproducir(){
		try {
			sonido.play();
		} catch (BasicPlayerException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();}
	}
	public void setImagen(int i){
		switch(i){
			case 1:{grafica.setIcon(imagen1);break;}
			case 2:{grafica.setIcon(imagen2);break;}
			case 3:{grafica.setIcon(imagen3);break;}}
	}
}
